﻿// CMainWnd.cpp: 实现文件
//

#include "pch.h"
#include "HookEngine.h"
#include "CMainWnd.h"
#include "afxdialogex.h"
#include "CModuleHide.h"



// CMainWnd 对话框

IMPLEMENT_DYNAMIC(CMainWnd, CDialogEx)

CMainWnd::CMainWnd(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_MAIN_WND, pParent)
{

}

CMainWnd::~CMainWnd()
{
}

void CMainWnd::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CMainWnd, CDialogEx)
	ON_BN_CLICKED(IDC_TEST1, &CMainWnd::OnBnClickedTest1)
END_MESSAGE_MAP()




BOOL Wudi(HOOKREFS) {

	if (_ESI == 0x4cef08) {
		_EDI = 0;
	}
	return false;
}

void CMainWnd::OnBnClickedTest1()
{
	m_Hook.SetHook(0x41fdb2, 3, Wudi, 0x41fdb2);
	CModuleHide* p{};
	p->Hide(L"HookEngine.dll");
}
